library(BlockChain)
library(foreach)
library(magrittr)
library(doParallel)
## Loading required package: iterators
## Loading required package: parallel
library(ggpubr)
## Loading required package: ggplot2
library(kableExtra)
# --------- #
# load data
# --------- #
currency_algo_date <- readRDS(file = "../output/currency_algo_date.rds")
currency_algo_date_top <- readRDS(file = here::here("output/currency_algo_date_top.rds"))
currency_algo_date_scrypt <- readRDS(file = here::here("output/currency_algo_date_scrypt.rds"))
asic_spec_top <- readRDS(file = "../output/asic_spec_top.rds")
asic_spec_scrypt <- readRDS(file = "../output/asic_spec_scrypt.rds")
gpu_spec <- readRDS(file = "../output/gpu_spec.rds")
currency_week_hashrate <- readRDS(file = "../cleaned/currency_week_hashrate.rds")
# categorical variables
currency_algo_date %>%
dplyr::select_if(~ !is.numeric(.)) %>%
gtsummary::tbl_summary(
data = .
)
| Characteristic | N = 49,8461 |
|---|---|
| currency | |
| BCH | 1,150 (2.3%) |
| BSV | 689 (1.4%) |
| BTC | 2,192 (4.4%) |
| BTG | 1,067 (2.1%) |
| DASH | 2,192 (4.4%) |
| DCR | 1,793 (3.6%) |
| DGB | 10,645 (21%) |
| EMC2 | 6,204 (12%) |
| GAME | 2,068 (4.1%) |
| HNS | 234 (0.5%) |
| KMD | 1,337 (2.7%) |
| LTC | 2,068 (4.1%) |
| MONA | 8,828 (18%) |
| XVG | 7,960 (16%) |
| ZEC | 1,419 (2.8%) |
| algo | |
| blake | 1,469 (2.9%) |
| blake256r14 | 1,793 (3.6%) |
| blake2b | 234 (0.5%) |
| equihash | 3,823 (7.7%) |
| groestl | 3,565 (7.2%) |
| lyra2re | 10,324 (21%) |
| odo | 300 (0.6%) |
| qubit | 2,069 (4.2%) |
| scrypt | 14,439 (29%) |
| sha256 | 4,031 (8.1%) |
| sha256d | 2,069 (4.2%) |
| skein | 2,069 (4.2%) |
| x11 | 2,192 (4.4%) |
| x17 | 1,469 (2.9%) |
| date | 2014-09-17 to 2021-01-06 |
| asic_dummy | 34,215 (69%) |
|
1
n (%); Range
|
|
# numerical variables
currency_algo_date %>%
dplyr::select_if(is.numeric) %>%
psych::describe(
fast = TRUE,
quant = c(0.25, 0.5, 0.75)
) %>%
kableExtra::kbl() %>%
kableExtra::kable_styling()
| vars | n | mean | sd | min | max | range | se | Q0.25 | Q0.5 | Q0.75 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| blockheight | 1 | 49396 | 2.024917e+06 | 2.277930e+06 | 630.0000000 | 1.084017e+07 | 1.083954e+07 | 1.024931e+04 | 5.898388e+05 | 1.246290e+06 | 2.325750e+06 |
| winning_rate | 2 | 49846 | 0.000000e+00 | 7.000000e-07 | 0.0000000 | 1.221000e-04 | 1.221000e-04 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 |
| block_time | 3 | 49846 | 2.101022e+02 | 1.180200e+03 | 3.5730595 | 1.115400e+05 | 1.115364e+05 | 5.286163e+00 | 7.701929e+01 | 1.002332e+02 | 1.666941e+02 |
| inverse_hash_rate | 4 | 49846 | 1.000000e-07 | 4.200000e-06 | 0.0000000 | 7.605000e-04 | 7.605000e-04 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 |
| hash_rate | 5 | 49846 | 1.496335e+18 | 1.064011e+19 | 1314.9601100 | 1.512549e+20 | 1.512549e+20 | 4.765748e+16 | 1.317994e+10 | 3.953882e+11 | 7.301090e+13 |
| hash_rate_sd | 6 | 49846 | 3.747026e+19 | 3.749912e+20 | 2801.0499854 | 1.567338e+22 | 1.567338e+22 | 1.679600e+18 | 1.734576e+11 | 6.524599e+12 | 9.032937e+14 |
| block_time_sd | 7 | 49846 | 3.716251e+02 | 3.452103e+03 | 0.2293934 | 2.203862e+05 | 2.203859e+05 | 1.546210e+01 | 8.335423e+01 | 1.578788e+02 | 2.799576e+02 |
| reward | 8 | 49846 | 1.064901e+03 | 1.280282e+04 | 0.0000664 | 8.400109e+05 | 8.400109e+05 | 5.734435e+01 | 1.884500e+01 | 4.312609e+01 | 7.300000e+02 |
| rate_quoteusd | 9 | 49846 | 2.211129e+02 | 1.250088e+03 | 0.0000025 | 1.953155e+04 | 1.953155e+04 | 5.599194e+00 | 5.030000e-03 | 5.891150e-02 | 3.243211e+00 |
| volume | 10 | 49846 | 0.000000e+00 | 0.000000e+00 | 0.0000000 | 1.000000e-07 | 1.000000e-07 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 |
| reward_quoteusd | 11 | 49846 | 2.864100e+03 | 2.210418e+04 | 0.0001500 | 1.339360e+06 | 1.339360e+06 | 9.900549e+01 | 7.551051e-01 | 4.758925e+00 | 6.461821e+01 |
# make time series
p <- currency_algo_date %>%
dplyr::mutate(log_winning_rate = log(winning_rate)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = date,
y = log_winning_rate,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Log of winning rate",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::mutate(log_hash_rate = log(hash_rate)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = date,
y = log_hash_rate,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Log of hash rate (H/s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = date,
y = block_time,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Block time (s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::mutate(log_hash_rate_sd = log(hash_rate_sd)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = date,
y = log_hash_rate_sd,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Log of hash rate s.d. (H/s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = date,
y = block_time_sd,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Block time s.d. (s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::mutate(log_volume = log(volume)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = date,
y = log_volume,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Log of transaction volume (Billion USD)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ dplyr::distinct(
.,
currency,
date,
.keep_all = TRUE
) %>%
ggplot(
aes(
x = date,
y = rate_quoteusd,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Exchange rate (USD)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "none"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# make time series
p <- currency_algo_date %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ dplyr::distinct(
.,
currency,
date,
.keep_all = TRUE
) %>%
ggplot(
aes(
x = date,
y = reward_quoteusd,
colour = algo
)
) +
geom_point() +
labs(
x = "Date",
y = "Reward (USD)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "none"
)
)
# draw time series
currency_list <-
unique(currency_algo_date$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# categorical variables
currency_week_hashrate %>%
dplyr::select_if(~ !is.numeric(.)) %>%
gtsummary::tbl_summary(
data = .
)
| Characteristic | N = 11,8731 |
|---|---|
| currency | |
| AUR | 1,650 (14%) |
| BCD | 152 (1.3%) |
| BCH | 165 (1.4%) |
| BSV | 99 (0.8%) |
| BTC | 612 (5.2%) |
| BTG | 153 (1.3%) |
| DASH | 348 (2.9%) |
| DCR | 257 (2.2%) |
| DGB | 1,992 (17%) |
| EMC2 | 978 (8.2%) |
| FLO | 361 (3.0%) |
| GAME | 326 (2.7%) |
| HNS | 37 (0.3%) |
| KMD | 614 (5.2%) |
| LTC | 450 (3.8%) |
| MONA | 1,412 (12%) |
| RVN | 286 (2.4%) |
| XVG | 1,465 (12%) |
| XZC | 312 (2.6%) |
| ZEC | 204 (1.7%) |
| algo | |
| blake | 293 (2.5%) |
| blake256r14 | 257 (2.2%) |
| blake2b | 37 (0.3%) |
| equihash | 971 (8.2%) |
| groestl | 955 (8.0%) |
| lyra2re | 1,705 (14%) |
| lyra2z | 312 (2.6%) |
| odo | 332 (2.8%) |
| qubit | 662 (5.6%) |
| scrypt | 3,070 (26%) |
| sha256 | 876 (7.4%) |
| sha256d | 662 (5.6%) |
| skein | 662 (5.6%) |
| x11 | 348 (2.9%) |
| x13 | 152 (1.3%) |
| x16r | 286 (2.4%) |
| x17 | 293 (2.5%) |
| week | 2008-12-28 to 2021-01-03 |
|
1
n (%); Range
|
|
# numerical variables
currency_week_hashrate %>%
dplyr::select_if(is.numeric) %>%
psych::describe(
fast = TRUE,
quant = c(0.25, 0.5, 0.75)
) %>%
kableExtra::kbl() %>%
kableExtra::kable_styling()
| vars | n | mean | sd | min | max | range | se | Q0.25 | Q0.5 | Q0.75 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| winning_rate | 1 | 10648 | 2.246000e-03 | 1.126050e-02 | 0.0000000 | 5.882350e-02 | 5.882350e-02 | 1.091000e-04 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 |
| block_time | 2 | 10648 | 9.733097e+06 | 4.652913e+07 | 11.3409573 | 2.427869e+08 | 2.427869e+08 | 4.509111e+05 | 7.725761e+01 | 1.511744e+02 | 2.965810e+02 |
| inverse_hash_rate | 3 | 10648 | 5.391823e+05 | 2.722193e+06 | 0.0000000 | 1.428158e+07 | 1.428158e+07 | 2.638061e+04 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 |
| hash_rate | 4 | 10648 | 1.007015e+18 | 8.751839e+18 | 0.0000001 | 1.405663e+20 | 1.405663e+20 | 8.481356e+16 | 2.876068e+09 | 1.195893e+11 | 1.688846e+13 |
| hash_rate_sd | 5 | 10138 | 3.506202e+19 | 3.157469e+20 | 0.0000000 | 6.722394e+21 | 6.722394e+21 | 3.135905e+18 | 1.271116e+11 | 3.026989e+12 | 3.353185e+14 |
| block_time_sd | 6 | 10138 | 1.255881e+03 | 6.807526e+04 | 0.0000000 | 6.573818e+06 | 6.573818e+06 | 6.761035e+02 | 9.456026e+01 | 1.778663e+02 | 4.465168e+02 |
# make time series
p <- currency_week_hashrate %>%
dplyr::mutate(log_winning_rate = log(winning_rate)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = week,
y = log_winning_rate,
colour = algo
)
) +
geom_point() +
labs(
x = "Week",
y = "Log of winning rate",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_week_hashrate$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
## Warning: Removed 476 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 425 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 324 rows containing missing values (geom_point).
[[1]]
[[1]]
# make time series
p <- currency_week_hashrate %>%
dplyr::mutate(log_hash_rate = log(hash_rate)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = week,
y = log_hash_rate,
colour = algo
)
) +
geom_point() +
labs(
x = "Week",
y = "Log of hash rate (H/s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_week_hashrate$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
## Warning: Removed 476 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 425 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 324 rows containing missing values (geom_point).
[[1]]
[[1]]
# make time series
p <- currency_week_hashrate %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = week,
y = block_time,
colour = algo
)
) +
geom_point() +
labs(
x = "Week",
y = "Block time (s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_week_hashrate$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
## Warning: Removed 476 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 425 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 324 rows containing missing values (geom_point).
[[1]]
[[1]]
# make time series
p <- currency_week_hashrate %>%
dplyr::mutate(log_hash_rate_sd = log(hash_rate_sd)) %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = week,
y = log_hash_rate_sd,
colour = algo
)
) +
geom_point() +
labs(
x = "Week",
y = "Log of hash rate s.d. (H/s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_week_hashrate$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
## Warning: Removed 476 rows containing missing values (geom_point).
[[1]]
## Warning: Removed 4 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
## Warning: Removed 1 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 425 rows containing missing values (geom_point).
[[1]]
## Warning: Removed 3 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 402 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 324 rows containing missing values (geom_point).
[[1]]
## Warning: Removed 100 rows containing missing values (geom_point).
[[1]]
# make time series
p <- currency_week_hashrate %>%
dplyr::group_split(currency) %>%
purrr::map(
.,
~ ggplot(
.,
aes(
x = week,
y = block_time_sd,
colour = algo
)
) +
geom_point() +
labs(
x = "Week",
y = "Block time s.d. (s)",
title = .$currency[1]
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
# draw time series
currency_list <-
unique(currency_week_hashrate$currency)
for (i in 1:length(p)) {
cat("### ", currency_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
## Warning: Removed 476 rows containing missing values (geom_point).
[[1]]
## Warning: Removed 4 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
## Warning: Removed 1 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 425 rows containing missing values (geom_point).
[[1]]
## Warning: Removed 3 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 402 rows containing missing values (geom_point).
[[1]]
[[1]]
[[1]]
[[1]]
## Warning: Removed 324 rows containing missing values (geom_point).
[[1]]
## Warning: Removed 100 rows containing missing values (geom_point).
[[1]]
# average gpu hash power
gpu_date <-
gpu_spec %>%
tidyr::expand(
model,
date = seq(min(release), to = as.Date("2020-12-31"), by = 1)
) %>%
dplyr::left_join(
gpu_spec,
by = c("model", "date" = "release")
) %>%
dplyr::group_by(model) %>%
tidyr::fill(dplyr::everything(), .direction = "down") %>%
dplyr::ungroup()
# plot number of available gpu machines
gpu_date %>%
dplyr::group_by(date) %>%
dplyr::summarise(number = sum(!is.na(hash_rate_spec))) %>%
dplyr::ungroup() %>%
ggpubr::ggline(
x = "date",
y = "number",
ylab = "number of available models",
plot_type = "l"
)
# plot hash_rate_spec
gpu_date %>%
dplyr::group_by(date) %>%
dplyr::summarise(
min = min(hash_rate_spec, na.rm = TRUE),
median = quantile(hash_rate_spec, 0.5, na.rm = TRUE),
max = max(hash_rate_spec, na.rm = TRUE)
) %>%
dplyr::ungroup() %>%
tidyr::pivot_longer(cols = c(min, median, max)) %>%
ggplot(
aes(
x = date,
y = value,
colour = name
)
) +
geom_line() +
labs(
x = "Date",
y = "Hashrate (h/s) for ethash"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
# average asic hash power for top currencies
asic_algo_date_top <-
asic_spec_top %>%
tidyr::expand(
tidyr::nesting(model, algo),
date = seq(min(release), to = as.Date("2020-12-31"), by = 1)
) %>%
dplyr::left_join(
asic_spec_top,
by = c("model", "algo", "date" = "release")
) %>%
dplyr::group_by(model) %>%
tidyr::fill(dplyr::everything(), .direction = "down") %>%
dplyr::ungroup()
# plot number of available asic machines
asic_algo_date_top %>%
dplyr::group_by(algo, date) %>%
dplyr::summarise(number = sum(!is.na(hash_rate_spec))) %>%
dplyr::ungroup() %>%
ggplot(
aes(
x = date,
y = number,
colour = algo
)
) +
geom_line() +
labs(
x = "Date",
y = "Number of available models"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
## `summarise()` has grouped output by 'algo'. You can override using the `.groups` argument.
# plot hash_rate_spec
p <-
asic_algo_date_top %>%
dplyr::group_split(algo) %>%
purrr::map(.,
~ dplyr::filter(., !is.na(hash_rate_spec)) %>%
dplyr::group_by(date) %>%
dplyr::summarise(
min = min(hash_rate_spec, na.rm = TRUE),
median = quantile(hash_rate_spec, 0.5, na.rm = TRUE),
max = max(hash_rate_spec, na.rm = TRUE)
) %>%
dplyr::ungroup() %>%
tidyr::pivot_longer(cols = c(min, median, max)) %>%
ggplot(
aes(
x = date,
y = value,
colour = name
)
) +
geom_line() +
labs(
x = "Date",
y = "Hash rate (h/s)"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
algo_list <-
unique(asic_algo_date_top$algo)
for (i in 1:length(p)) {
cat("#### ", algo_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# average asic hash power for scrypt currencies
asic_algo_date_scrypt <-
asic_spec_scrypt %>%
tidyr::expand(
tidyr::nesting(model, algo),
date = seq(min(release), to = as.Date("2020-12-31"), by = 1)
) %>%
dplyr::left_join(
asic_spec_scrypt,
by = c("model", "algo", "date" = "release")
) %>%
dplyr::group_by(model) %>%
tidyr::fill(dplyr::everything(), .direction = "down") %>%
dplyr::ungroup()
# plot number of available asic machines
asic_algo_date_scrypt %>%
dplyr::group_by(algo, date) %>%
dplyr::summarise(number = sum(!is.na(hash_rate_spec))) %>%
dplyr::ungroup() %>%
ggplot(
aes(
x = date,
y = number,
colour = algo
)
) +
geom_line() +
labs(
x = "Date",
y = "Number of available models"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
## `summarise()` has grouped output by 'algo'. You can override using the `.groups` argument.
# plot hash_rate_spec
p <-
asic_algo_date_scrypt %>%
dplyr::group_split(algo) %>%
purrr::map(.,
~ dplyr::filter(., !is.na(hash_rate_spec)) %>%
dplyr::group_by(date) %>%
dplyr::summarise(
min = min(hash_rate_spec, na.rm = TRUE),
median = quantile(hash_rate_spec, 0.5, na.rm = TRUE),
max = max(hash_rate_spec, na.rm = TRUE)
) %>%
dplyr::ungroup() %>%
tidyr::pivot_longer(cols = c(min, median, max)) %>%
ggplot(
aes(
x = date,
y = value,
colour = name
)
) +
geom_line() +
labs(
x = "Date",
y = "Hash rate (H/s)"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
algo_list <-
unique(asic_algo_date_scrypt$algo)
for (i in 1:length(p)) {
cat("#### ", algo_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
# make basic data
base_asic_currency_algo_date_top <-
make_baseline_data_asic(
spec = asic_spec_top,
currency_algo_date = currency_algo_date_top,
currency_base = currency_algo_date_top$currency[1]
)
base_gpu_currency_algo_date_top <-
make_baseline_data_gpu(
spec = gpu_spec,
currency_algo_date = currency_algo_date_top
)
base_asic_currency_algo_date_scrypt <-
make_baseline_data_asic(
spec = asic_spec_scrypt,
currency_algo_date = currency_algo_date_scrypt,
currency_base = currency_algo_date_scrypt$currency[1]
)
base_gpu_currency_algo_date_scrypt <-
make_baseline_data_gpu(
spec = gpu_spec,
currency_algo_date = currency_algo_date_scrypt
)
# merge asic and gpu
basic_currency_algo_date_top <-
dplyr::bind_rows(
base_asic_currency_algo_date_top,
base_gpu_currency_algo_date_top
)
basic_currency_algo_date_scrypt <-
dplyr::bind_rows(
base_asic_currency_algo_date_scrypt,
base_gpu_currency_algo_date_scrypt
)
# initial estimate of machine installment
p <-
basic_currency_algo_date_top %>%
dplyr::group_split(algo) %>%
purrr::map(.,
~ dplyr::group_by(., date) %>%
dplyr::summarise(
hash_rate = sum(hash_rate),
hash_rate_spec_max = max(hash_rate_spec),
hash_rate_spec_mean = mean(hash_rate_spec)
) %>%
dplyr::ungroup() %>%
dplyr::mutate(
q_guess_by_max = hash_rate / (1e+6 * hash_rate_spec_max),
q_guess_by_mean = hash_rate /(1e+6 * hash_rate_spec_mean)
) %>%
tidyr::pivot_longer(cols = dplyr::starts_with("q_guess_by")) %>%
ggplot(
aes(
x = date,
y = value,
colour = name
)
) +
geom_line() +
labs(
x = "Date",
y = "Units (million)"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
algo_list <-
unique(basic_currency_algo_date_top$algo)
for (i in 1:length(p)) {
cat("### ", algo_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
# initial estimate of machine installment
p <-
basic_currency_algo_date_scrypt %>%
dplyr::group_split(algo) %>%
purrr::map(.,
~ dplyr::group_by(., date) %>%
dplyr::summarise(
hash_rate = sum(hash_rate),
hash_rate_spec_max = max(hash_rate_spec),
hash_rate_spec_mean = mean(hash_rate_spec)
) %>%
dplyr::ungroup() %>%
dplyr::mutate(
q_guess_by_max = hash_rate / (1e+6 * hash_rate_spec_max),
q_guess_by_mean = hash_rate /(1e+6 * hash_rate_spec_mean)
) %>%
tidyr::pivot_longer(cols = dplyr::starts_with("q_guess_by")) %>%
ggplot(
aes(
x = date,
y = value,
colour = name
)
) +
geom_line() +
labs(
x = "Date",
y = "Units (million)"
) +
scale_colour_viridis_d() +
theme_classic() +
theme(
legend.position = "bottom"
)
)
algo_list <-
unique(basic_currency_algo_date_scrypt$algo)
for (i in 1:length(p)) {
cat("### ", algo_list[i], "\n")
print(p[i])
cat("\n")
}
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]
[[1]]